
// This guard ensures that X11 implementation is used only
// on unix platform.
#ifndef MY_USE_UNIX

    #error Unix version of __FILE__ is used without MY_USE_UNIX defined.

#endif

#include "Core/Application.hpp"
#include "Core/Unix/ApplicationImp.hpp"
#include "Core/Unix/WindowImp.hpp"

namespace My
{
    WindowImp::WindowImp(const std::string& title, uint32_t width, uint32_t height);
    {
        ApplicationImp& application = static_cast< ApplicationImp& >(Application::Get());
        Display* display = application.GetDisplay();
        Window root_window = application.GetRootWindow();

        m_Handle = XCreateWindow(display,
                                 root_window,
                                 0, 0,
                                 width, height, 1,
                                 xlib::CopyFromParent,
                                 xlib::CopyFromParent,
                                 xlib::CopyFromParent,
                                 0, 0);

        XMapWindow(display, m_Handle);
        XFlush(display);
    }

    WindowImp::~WindowImp()
    {

    }

    void WindowImp::Initialize()
    {

    }
}
